package com.ruijie.autotest.log.impl.data;

import java.util.Arrays;

public class Columns {

	private final String[] columns;

	public Columns(String[] columns) {
		this.columns = columns;
	}

	public int indexOf(String columnName) {
		for (int at = 0; at < columns.length; at++) {
			if (columns[at].equals(columnName)) {
				return at;
			}
		}
		return -1;
	}

	public String[] toArray() {
		return columns;
	}

	@Override
	public String toString() {
		return "Columns{" +
				"columns=" + Arrays.toString(columns) +
				'}';
	}
}
